<div class="modal-body no-p">
	<div class="row">
		<div class="col-xs-12">
			<section class="panel panel-primary no-b">
				<header class="panel-heading clearfix brtl brtr">
					<div class="overflow-hidden">
						<a href="javascript:;" class="h4 show no-m pt5">商品详情</a>
					</div>
				</header>

				<div id="formPrinter">
					<div class="table-form">
						<div class="h2">
							{{goods.name}}
						</div>
						<table>
							<tr>
								<td colspan="6" class="h5">基本信息</td>
							</tr>
							<tr>
								<td>商品ID</td>
								<td>{{goods.id}}</td>
								<td>商品编号</td>
								<td>{{goods.goods_sn}}</td>
								<td>创建时间</td>
								<td>{{goods.create_time | datetime}}</td>

							</tr>
							<tr>

								<td>商品分类</td>
								<td>{{goods.category.name if goods.category else '无'}}</td>
								<td>品牌</td>
								<td>{{goods.brand.name if goods.brand else '无'}}</td>
								<td>商品市场价</td>
								<td>{{goods.market_price}}</td>

							</tr>
							<tr>
								<td>商品售价</td>
								<td>{{goods.retail_price}}</td>
								<td>库存数量</td>
								<td>{{goods.goods_number}}</td>
								<td>商品单位</td>
								<td>{{goods.goods_unit}}</td>
							</tr>
							<tr>
								<td>是否在售</td>
								<td>{{'是' if goods.is_on_sale else '否'}}</td>
								<td>是否新品</td>
								<td>{{'是' if goods.is_new else '否'}}</td>
								<td>是否热销</td>
								<td>{{'是' if goods.is_hot else '否'}}</td>
							</tr>
							<tr>
								<td>主图</td>
								<td>
									{% if goods.primary_pic_url%}
									<img src="{{goods.primary_pic_url}}"  onclick="sublime.picture('{{goods.primary_pic_url}}')" />
									{% endif %}
								</td>
								<td>图集</td>
								<td colspan="3">
									{% if goods.list_pic_url%}
									{% for item in goods.list_pic_url | split(",")%}
									<img src="{{item}}"  onclick="sublime.picture('{{item}}')" class="mr10"/>
									{% endfor %}
									{%endif%}
									
								</td>
							</tr>
							
							

						</table>
						
						{% if goods.attribute %}
						<table>
							<tr>
								<td colspan="2" class="h5">商品属性</td>
							</tr>
							
							<!--<tr>
								<td>属性名称</td>
								<td>属性值</td>
								

							</tr>-->
						
							
							{% for item in goods.attribute%}
							<tr>
								<td>{{item.attribute.name}}</td>
								
								<td>{{item.value}}</td>
								

							</tr>
							{% endfor %}
							
						</table>
						{% endif %}
						{% if goods.product %}
						<table>
							<tr>
								<td colspan="5" class="h5">商品规格</td>
							</tr>
							
							<tr>
								<th>SN</th>
								<th>规格</th>
												<th>库存</th>
												<th>价格</th>
												<th>图片</th>
												
								

							</tr>
						
							
							{% for item in goods.product%}
							<tr>
								<td>{{item.goods_sn}}</td>
								<td>
									
									{% if item.goods_specification_ids %}
									
									{% for itm in item.goods_specification_ids | split("_")%}
									
									<a class="btn btn-primary btn-xs">{{specification[itm]}}</a>
									
									{% endfor %}
									{% else %}
									<a class="btn btn-primary btn-xs">标准</a>
									{% endif%}
								
								</td>
								<td>{{item.goods_number}}</td>
								<td>{{item.retail_price}}</td>
								<td>
									{% if item.pic_url%}
									<img src="{{item.pic_url}}"  onclick="sublime.picture('{{item.pic_url}}')" />
									{% endif%}
								</td>
								

							</tr>
							{% endfor %}
							
						</table>
						{% endif %}
						<table>
							<tr>
								<td class="h5">商品详情</td>
							</tr>
							<tr>
								<td class="detail">
									{{goods.content | safe}}
								</td>

							</tr>
							
						</table>
						
					</div>

				</div>

			</section>

		</div>
	</div>
</div>
<div class="modal-footer">
	<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
	<button type="button" class="btn  btn-primary" onclick="sublime.printer()">打印</button>
</div>